package cn.com.gzqd.util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

public class MySQLHelp implements DBHelper {

	@Override
	public Connection getConnection() throws Exception {
		Class.forName("com.mysql.jdbc.Driver");
		String url="jdbc:mysql://localhost:3306/the book?characterEncoding=UTF-8";
		String user="root";
		String password="CM3310785";
		Connection conn=DriverManager.getConnection(url, user, password);
		return conn;
	}

	@Override
	public void closeConnection(Connection connection) throws Exception {
		connection.close();

	}
	
}
